package planejarViagem;

import jess.JessException;
import jess.Rete;
import jess.Value;

public class InferenciasJess {
	Rete saidaJess = new Rete();
	private Rete engine;
	public void PricingEngine() throws JessException {
//	 Create a Jess rule engine
	engine = new Rete();
	engine.reset();
//	 Load the pricing rules

	}
	public static void main(String[] str) {
		try {
		Rete r = new Rete();
		r.reset();// Antes de dar o batch tem q dar um reset
		r.batch("/planejarViagem/square.clp");
		//r.eval(" (deffunction square (?n) " +" (return (* ?n ?n)) " +" ) ");
		Value v = r.eval("(square 3)");

		System.out.println(v.intValue(r.getGlobalContext()));
		} catch (JessException ex) {
		System.err.println(ex);
		}
		}

}
